package cn.gzsf.springboot06.mapper;

import cn.gzsf.springboot06.entity.Item;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ItemMapper {

    @Insert("insert into item values(null,#{name},#{price},#{intro})")
    void insert(Item item);
    @Delete("delete from item where id=#{id}")
    void delete(int id);
    @Update("update item set name=#{name},price=#{price},intro=#{intro} where id=#{id}")
    void update(Item item);
    @Select("select * from item")
    List<Item> select();


}
